def malloc(size):
    return bytearray(size, encoding='utf-8')

def free(buffer):
    buffer = None
    print(buffer)

def toJsString(buffer, size):
    return buffer.decode('utf-8')

def getaddr(buffer):
    return buffer

def getlen(buffer):
    return len(buffer)